# RUN: %lldb --script-language lua -o 'command script import %S/Inputs/testmodule.lua' -o 'script testmodule.foo()' 2>&1 | FileCheck %s
# CHECK: Hello World!

# RUN: mkdir -p %t
# RUN: cp %S/Inputs/testmodule.lua %t/testmodule.notlua
# RUN: %lldb --script-language lua -o 'command script import %t/testmodule.notlua' -o 'script testmodule.foo()' 2>&1 | FileCheck %s --check-prefix EXTENSION
# EXTENSION: error: module importing failed: lua failed to import '{{.*}}testmodule.notlua': invalid extension
# EXTENSION-NOT: Hello World!

# RUN: %lldb --script-language lua -o 'command script import %S/Inputs/bogus' -o 'script testmodule.foo()' 2>&1 | FileCheck %s --check-prefix NONEXISTING
# NONEXISTING: error: module importing failed: lua failed to import '{{.*}}bogus': invalid path
# NONEXISTING-NOT: Hello World!
